<?php 
include('config.php'); 
$tips = '';
include('admincore.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php include('inc.php'); ?>
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.dragsort-0.4.min.js"></script>
<script type="text/javascript">
function getsort(){
	var str = '';
	 $("#sxlist li").each(function(i){
	     str+=','+$("#sxlist li").eq(i).text();
	 });
	$("#sort").val(str);
	return true;
}
function subck(){
	var sitepath = $("#ff6_path").val();
	var pcdomain = $("#ff6_pcdomain").val();
	var mobiledomain = $("#ff6_mobiledomain").val();
	if(sitepath.length>1){
		n=(sitepath.split('/')).length-1;
		if(n<2){
			alert("网站目录：如果放子目录，需要前后都带斜杠“/”，比如：/dy/");
			$("#ff6_path").focus();
		   return false;	
		}
	}
	if(pcdomain.indexOf('/')>0 || mobiledomain.indexOf('/')>0){
		alert("PC域名和手机域名只需填写域名就可以了，不要加目录也不要加斜杠，比如：m213.cn 或者 m.m213.cn");
		$("#ff6_pcdomain").focus();
		return false;
	}
	return true;
}
$(function(){
	$("#searchsiteopen").click(function(){
	
		if($(this).attr("checked")){
			
			$("#searchsite").show();
		}else{
			
			$("#searchsite").hide();
		}
		
	});
	
	$("#rebtn_1").click(function(){
		$(".rebox").show();
	});
	$("#rebtn_2").click(function(){
		$(".rebox").hide();
	});
})
</script>

</head>

<body>
<?php $nav = 'setting';include('head.php'); ?>

<div id="hd_main">
  <div align="center"><?php echo $tips?></div>
 <form name="configform" id="configform" action="./setting.php?act=setting&t=<?php echo time()?>" method="post" onsubmit="return subck()">

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="tablecss">
<tr class="thead">
<td colspan="10" align="center">基本设置</td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">网站名称：</td>
    <td width="690" valign="middle"><input name="edit" id="edit" type="hidden" value="1" /><input type="text" name="ff6[sitename]" value="<?php echo $ff6['sitename']?>" size="50">
      <span class="gray tips">如：千秋小说网</span></td>
</tr>

<tr>
    <td width="125" align="right" valign="middle" class="s_title">首页标题：</td>
    <td valign="top"><input type="text" name="ff6[title]" value="<?php echo $ff6['title']?>" size="50">
      <span class="gray tips">显示在首页标题上，一般不超过80个字符</span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">首页关键字：</td>
    <td valign="top"><input type="text" name="ff6[keywords]" value="<?php echo $ff6['keywords']?>" size="50">
      <span class="gray tips">关键字请用英文逗号分开，一般不超过100个字符</span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">首页描述：</td>
    <td valign="top"><span class="gray tips">一般不超过200个字符</span><div class="cl5"></div><textarea name="ff6[description]" cols="80" rows="3"><?php echo $ff6['description']?></textarea></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">首页顶部公告内容：</td>
    <td valign="top"><textarea name="ff6[hometopnotice]" cols="80" rows="3"><?php echo $ff6['hometopnotice']?></textarea></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">模版目录：</td>
    <td width="690" valign="middle">
	<input type="text" name="ff6[model]" id="ff6_model" value="<?php echo $ff6['model']?>" size="8">
      <select name="ff6[model]">
		<option value="default"<?php echo $ff6['model']=='default'?' selected="selected"':''?>>经典版</option>
        <option value="news"<?php echo $ff6['model']=='news'?' selected="selected"':''?>>新模版</option>
      </select>
     <span class="gray tips">模板存放在view目录下，默认：default</span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">网站目录：</td>
    <td width="690" valign="middle">
	<input type="text" name="ff6[path]" id="ff6_path" value="<?php echo $ff6['path']?>" size="20">
      <span class="gray tips">根目录请填写 / ，子目录请填写如：/xx/</span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">网站域名：</td>
    <td width="690" valign="middle"><input type="text" name="ff6[pcdomain]" id="ff6_pcdomain" value="<?php echo $ff6['pcdomain']?>" size="20">
      <span class="gray tips">你的网站域名，如 m213.cn </span></td>
</tr>
<tr class="thead">
<td colspan="10" align="center">高级设置</td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">API接口参数</td>
    <td valign="top">	
      <select name="ff6[checktime]">
		<option value="999999999"<?php echo $ff6['checktime']=='999999999'?' selected="selected"':''?>>不检测</option>
        <option value="1800"<?php echo $ff6['checktime']=='1800'?' selected="selected"':''?>>30分钟</option>
        <option value="3600"<?php echo $ff6['checktime']=='3600'?' selected="selected"':''?>>1小时</option>
        <option value="10800"<?php echo $ff6['checktime']=='10800'?' selected="selected"':''?>>3小时</option>
      </select>
	  <span class="gray"><?php echo substr(testapi('99999999') , 7, 3);?>接口检测，正常请关闭</span>
      <select name="ff6[apitype]">
		<option value="vip"<?php echo $ff6['apitype']=='vip'?' selected="selected"':''?>>VIP用户</option>
      </select><span class="gray">会员类型</span>   
&nbsp;<span id="vipapikey"<?php echo $ff6['apitype']=='free'?' style="display:none;"':''?>><input type="text" name="ff6[vipapikey]" value="<?php echo $ff6['vipapikey']?>" size="14">        
      <span class="gray tips">填入密钥，<a href="http://m213.cn/" target="_blank">购买密钥</a></span></span><?php if($ff6['apitype']=='vip'){?>  &nbsp;（<font color="red">VIP资格</font>）<?php }?>
      </td>
</tr>

<tr>
    <td width="125" align="right" valign="middle" class="s_title">数据缓存时间：</td>
    <td valign="top">
      <select name="ff6[cachetime]">
        <option value="1800"<?php echo $ff6['cachetime']=='1800'?' selected="selected"':''?>>30分钟</option>
        <option value="3600"<?php echo $ff6['cachetime']=='21600'?' selected="selected"':''?>>1小时</option>
        <option value="10800"<?php echo $ff6['cachetime']=='21600'?' selected="selected"':''?>>3小时</option>
        <option value="21600"<?php echo $ff6['cachetime']=='21600'?' selected="selected"':''?>>6小时</option>
        <option value="43200"<?php echo $ff6['cachetime']=='43200'?' selected="selected"':''?>>12小时</option>
        <option value="86400"<?php echo $ff6['cachetime']=='86400'?' selected="selected"':''?>>1天</option>
        <option value="259200"<?php echo $ff6['cachetime']=='259200'?' selected="selected"':''?>>3天</option>
        <option value="604800"<?php echo $ff6['cachetime']=='604800'?' selected="selected"':''?>>7天</option>
        <option value="2592000"<?php echo $ff6['cachetime']=='2592000'?' selected="selected"':''?>>一个月</option>
        <option value="0"<?php echo $ff6['cachetime']=='0'?' selected="selected"':''?>>永久</option>
      </select>  
      <span class="gray">(数据缓存有效时间，建议大于12小时)</span>
      
      </td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">首页友情链接：</td>
    <td valign="top"><font color="red">请保留娴娴小说链接</font>，VIP可以去除，感谢朋友们配合！<div class="cl5"></div><textarea name="ff6[homelink]" cols="80" rows="3"><?php echo $ff6['homelink']?></textarea></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">底部信息：</td>
    <td valign="top"><textarea name="ff6[foot]" cols="80" rows="5"><?php $ff6['foot'] = str_replace("\\'","'",$ff6['foot']);echo htmlspecialchars($ff6['foot'])?></textarea>
      </td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">ICP备案号：</td>
    <td width="690" valign="middle"><input type="text" name="ff6[icp]" id="ff6_path" value="<?php echo $ff6['icp']?>" size="20"></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">登录账号：</td>
    <td valign="top"><input type="text" name="ff6[admin_name]" value="<?php echo $ff6['admin_name']?>" size="30">
      <span class="gray tips"></span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">登录密码：</td>
    <td valign="top"><input type="text" name="ff6[admin_pass]" value="" size="30">
      <span class="gray tips">不修改请留空</span></td>
</tr>
<tr>
    <td width="125" align="right" valign="middle" class="s_title">禁止某些IP访问：</td>
    <td valign="top">多个IP请用“|”分开，如111.111.111.111|222.222.222.222<div class="cl5"></div><textarea name="ff6[ip]" cols="80" rows="3"><?php echo $ff6['ip']?></textarea>
      </td>
</tr>

<tr>
<td colspan="10" align="center"><input name="edit" type="hidden" value="1" /><input id="configSave" type="submit" onclick="return getsort()" value="保 存"></td>
</tr>
</table>
</form>
<script type="text/javascript">
	$(".sxlist:first").dragsort();
</script>
</div>
<?php include('foot.php'); ?>
</body>
</html>
